package day05;

import static java.lang.Math.sqrt;
import static java.lang.System.currentTimeMillis;
import static java.lang.System.setOut;

public class 素数2 {
    public static void main(String[] args) {
        long start = currentTimeMillis();
        for (int i=2;i<100000;i++){
            boolean x=true;
            for (int j=2;j<=sqrt(i);j++){
                if(i%j==0){
                    x=false;
                    //continue;
                    break;
                }
            }
            if(x==true){
                System.out.println(i);
            }
        }
        long end = currentTimeMillis();
        System.out.println("Time："+(end-start));;
    }
}
